package com.slz3.business.module.drawManagement.draFreeLottery.domain;

import com.slz3.business.frame.annotation.ConfigDomain;
import com.slz3.business.module.drawManagement.draFreeLottery.repository.DraFreeLotteryRepository;
import com.slz3.business.module.goodsManagement.gooBrand.domain.GooBrand;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.ColumnDefault;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

@ConfigDomain(repositoryClass = DraFreeLotteryRepository.class)
@Entity
@Table(schema = "draw_management", name = "dra_free_lottery")
@Data
@EqualsAndHashCode(callSuper = true)
public class DraFreeLottery extends DraFreeLotteryEntity implements Serializable {

    private static final long serialVersionUID = 3928173855627287110L;

    /**
     * 自增 Long
     */
    @Column(insertable = false)
    @ColumnDefault("nextval('mishang_old_frame_id_seq')")
    private Long incrementId;

    /**
     * 品牌类型
     */
    @Transient
    private GooBrand gooBrand;

}
